
import React,{ Component } from 'react';
import { Form,Input,Icon } from 'antd';
const FormItem = Form.Item;

class FormDatas extends Component {
    constructor(props) {
        super(props);
        this.state = {

        }
    }
    render() {
        const { getFieldDecorator } = this.props.form;

        return (
           <Form>
               <FormItem>
                   {
                       getFieldDecorator('userName',{
                           rules: [{ required: true, message: 'Please input your name!'}],
                       })(
                           <Input prefix={ <Icon type='user' style={{color: 'rgba(0,0,0,.25)'}}/> }
                                  placeholder="Username"
                           />
                       )
                   }
               </FormItem>
           </Form>
        )
    }
}

export default Form.create()(FormDatas);